﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace StockAnalyzerApp.Models
{
    public class PercentChangeDataItem
    {
        public PercentChangeDataItem()
        {

        }

        public PercentChangeDataItem(DataItem begin, DataItem end)
        {
            DateRange = begin.Date.Month + "/" + begin.Date.Day + "-"
                + end.Date.Month + "/" + end.Date.Day;
            PercentChange = Math.Round(((end.Price - begin.Price) / begin.Price) * 100, 2);
            Symbol = begin.Symbol;
        }
        public String DateRange { get; set; }
        public double PercentChange { get; set; }
        public String Symbol { get; set; }
    }
}